/*
 * @Author: wangyongcun@persagy.com
 * @Date: 2025-03-02 17:56:59
 * @LastEditTime: 2025-03-11 14:57:09
 * @FilePath: \vite-admin\src\router\index.ts
 * @Description: 路由信息
 *
 */
import { createRouter, createWebHistory } from 'vue-router';
// 路由守卫
import { createRouterGuard } from './guard';
// 路由信息
import routes from './routes';

// 路由配置
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: routes
});

// 导出路由
export async function setupRouter(app: App) {
  app.use(router);
  createRouterGuard(router);
  await router.isReady();
}

